import {isEmail, isMobile, isPassword, isUserName} from "./utils";


jQuery.validator.addMethod("isUserName", function (value, element) {
    return this.optional(element) || isMobile(value) || isEmail(value) || isUserName(value);
}, "请输入正确格式的登录名");
//
//
jQuery.validator.addMethod("isPassword", function (value, element) {
    return this.optional(element) || isPassword(value);
}, "请输入正确格式的密码");


jQuery.validator.addMethod("isMobile", function (value, element) {
    return this.optional(element) || isMobile(value);
}, "请输入正确格式的手机号码");